package realdance.swing;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class SwingMenuActionListener implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {

		switch (e.getActionCommand()) {
		case "new":
			JOptionPane.showMessageDialog
			(null, "new 메뉴를 선택하셨습니다.", "new 메뉴", JOptionPane.QUESTION_MESSAGE);
			break;

		case "close":
			JOptionPane.showMessageDialog
			(null, "close 메뉴를 선택하셨습니다.", "close 메뉴", JOptionPane.WARNING_MESSAGE);
			break;
			
		case "about": new SwingAboutDialog();
			break;

		case "exit": System.exit(0);
			break;

		case "modify":
			JOptionPane.showMessageDialog
			(null, "modify 메뉴를 선택하셨습니다.", "modify 메뉴", JOptionPane.ERROR_MESSAGE);
			break;

		}
	}

}
